home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Deutsche Edition 1
/
Deutsche Edition 1.iso
/
amok
/
amok_lha
/
amok10.lha
/
FeigenBaum
/
FeigenBaum.mod
< prev
next >
Wrap
Text File
|
1993-08-15
|
2KB
|
70 lines
MODULE Feigenbaum;
FROM SYSTEM IMPORT FFP, ADR;
FROM Arts IMPORT TermProcedure, Assert;
FROM Graphics IMPORT ViewModes, ViewModeSet, SetAPen, SetDrMd, WritePixel,
DrawModeSet, DrawModes, RastPortPtr, jam1;
FROM Intuition IMPORT NewScreen, OpenScreen, ScreenPtr, CloseScreen,
customScreen;
VAR
NuScreen: NewScreen;
Screen: ScreenPtr;
a,x: FFP;
i,j: CARDINAL;
rp: RastPortPtr;
Ciapra [0BFE001H]: SET OF (s0,s1,s2,s3,s4,s5,lmb);
(*------ CleanUp: ------*)
PROCEDURE CleanUp();
BEGIN
IF Screen#NIL THEN CloseScreen(Screen) END;
END CleanUp;
(*------ MAIN: ------*)
BEGIN
(*------ init: ------*)
Screen := NIL;
TermProcedure(CleanUp);
WITH NuScreen DO
leftEdge := 0;
topEdge := 0;
width := 640;
height := 512;
depth := 1;
detailPen:= 0;
blockPen := 1;
viewModes:= ViewModeSet{hires};
type := customScreen;
font := NIL;
defaultTitle := ADR("Feigenbaum 1988 by F. Siebert");
gadgets := NIL;
customBitMap := NIL;
END;
Screen := OpenScreen(NuScreen);
Assert(Screen#NIL,ADR("OpenScreen() failed!"));
rp := ADR(Screen^.rastPort);
SetAPen(rp,1);
SetDrMd(rp,jam1);
(*------ draw: ------*)
a := 2.8; i:=0;
WHILE (i<640) AND (a<4.0) DO
x := 0.5;
FOR j:=0 TO 150 DO x := a*x*(1.0-x) END;
FOR j:=0 TO 100 DO
x := a*x*(1.0-x);
IF WritePixel(rp,i,11+INTEGER(250.0*x))=0 THEN END;
END;
a := a + 0.001875;
INC(i);
END;
(*------ Warten: ------*)
WHILE lmb IN Ciapra DO END;
END Feigenbaum.